Skip to main content

mergGKPostAchievement

Type

command

Summary

Your game should report progress to Game Center whenever the player makes progress towards completing an achievement

Syntax

mergGKPostAchievement <pAchievement>, <pPercentComplete>, [<pShowBanner>]

Description

By storing progress information in Game Center, the Game Center app can display the player’s progress towards the achievement. If a player has multiple devices, your game on another device can retrieve the player’s progress towards achievements. Your game reports the player’s progress by using a floating-point percentage, from 0.0 to 100.0, that represents how much of the achievement the player has completed. You decide how that percentage is calculated and when it changes. For example, if the player earns an achievement simply for discovering a location in your game, then you would simply report the achievement as 100 percent complete the first time you report progress to Game Center. On the other hand, for an achievement like “Capture 10 pirates”, your reporting mechanism increments by 10 percent each time the player captures a pirate./ppWhen you report progress to Game Center, two things happen: ulliIf the achievement was previously hidden, it is revealed to the player. The achievement is revealed even if your player has made no actual progress on the achievement (a percentage of 0.0)./liliIf the reported value is higher than the previous value reported for the achievement, the value on Game Center is updated to the new value. Players never lose progress on achievements./liliWhen the progress reaches 100 percent, the achievement is marked completed, and both the image and completed description appear when the player views the achievements screen./li/ul

Parameters

NameTypeDescription

pAchievement

The achievement identifier.

pPercentComplete

The percentage complete between 0 and 100 percent.

pShowBanner

(optional with "true" default) If false the Game Center banner will not be shown to the user when they comlete the achievement.

  • true
  • false

Compatibility and Support

Introduced

LiveCode 8.0

OS

ios

Platforms

mobile

Thank you for your feedback!

Was this page helpful?